import 'package:get/get.dart';
import 'package:get/get_connect.dart';
import 'package:school_assistant_m/utils/base_api.dart';

class HomeworkApi extends BaseApi{
  ///  获取课程信息请求
  Future<Map<String,dynamic>> getHomeworkList() async {
    Response response = await get('/homeworkchecktask/');
    print('1--------------11-------------------1');
    print(response.body);
    return response.body;
  }

  ///  添加课程信息请求
  Future<Map<String,dynamic>> postHomework(Map courseForm) async {
    Response response = await post('/homework/',courseForm);
    print(response.body);
    return response.body;
  }

  ///根据id寻找课程
  Future<Map<String,dynamic>> getHomeworkById(id) async {
    Response response = await get('/homeworkchecktask/' + id.toString() + '/');
    print('0------根据id寻找作业--------0---------根据id寻找作业-----------0');
    print(response.body);
    return response.body;
  }
}